<{extends file='layout_simple.html'}>
<{block name='body'}>
    
	<div class="wrapper clearfix">
		<div class="wrap_box">
			<div id="fp_form">
				<h3 class="notice">忘记密码</h3>
				<p class="tips">欢迎来到我们的网站，如果忘记密码，请填写下面表单来重新获取密码</p>
				<div class="box">
				<form>
					<table class="form_table">
						<col width="300px" />
						<col width="250px" />
						<col />
						<tr><th class="t_r">用户名：</th><td><input id="username" class="gray" type="text" pattern="required" alt="请输入正确的用户名" /></td><td></td></tr>
						<tr><th class="t_r">邮箱：</th><td><input id="useremail" class="gray" type="text" pattern="email" alt="请输入正确的邮件地址" /></td><td></td></tr>
					<tr class="t_r"><th></th><td><img src='index.php?m=CaptchaImage' id='captchaImg' /><span class="light_gray">看不清？<a class="link" href="javascript:changeCaptcha('index.php?m=CaptchaImage');">换一张</a></span></td></tr>
						<tr><td></td><td><input class="submit" type="button" value="找回密码" onclick="submit_passwordfind(this);" /></td><td></td></tr>
					</table>
				</form>
				</div>
			</div>

			<div id="fp_success" style="display:none;">
				<h3 class="notice">找回密码</h3>
				<div class="box clearfix">
					<table class="form_table prompt_3 f_l">
						<col width="250px" />
						<col />
						<tr>
							<th valign="top"><img src="/views/default/skin/default/images/front/right.gif" width="48" height="51" alt="" /></th>
							<td>
								<p class="mt_10"><strong class="f14">恭喜，请去邮箱查收邮件！</strong></p>
								<p class="mt_10">修改密码的地址已经发送到您的邮箱，请注意查收！</p>
								<p>您现在可以去：<a class="blue" href="/">商城首页</a><a class="blue" href="/index.php?controller=ucenter&action=index">用户中心</a></p>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</div>
<script language="javascript">
$().ready(
	function(){$(".form_table input:text").focus(function(){$(this).addClass('current');}).blur(function(){$(this).removeClass('current');}) ;}
);
function submit_passwordfind(obj)
{
	obj.disabled = true;
	var username=$("#username").val();
	var useremail=$("#useremail").val();
	var captcha=$("#captcha").val();
	if(username=="" || useremail=="" || captcha=="")
	{
		alert('请填写信息');
		obj.disabled = false;
		return;
	}

	var data={'username':username,'useremail':useremail,"captcha":captcha};
	$.get(
		"/index.php?controller=simple&action=do_find_password",
		data,
		function(c)
		{
			if(c=='success')
			{
				$("#fp_form").hide();
				$("#fp_success").show('fast');
			}
			else
			{
				alert(c);
				obj.disabled = false;
			}
		}
	);
}
</script>
<{/block}>
